package com.css.dzj.zfjg.modules.taskinfo.mapper;

import com.css.dzj.zfjg.modules.taskinfo.entity.JgLhjgRwsEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

/**任务办理mapper
 * @author wt
 * @date 2020\2\20 0020
 */
@Repository
public interface JgLhjgRwsMapper extends JpaRepository<JgLhjgRwsEntity, String>, JpaSpecificationExecutor<JgLhjgRwsEntity>,
        QuerydslPredicateExecutor<JgLhjgRwsEntity> {
       @Query(value = "select max(lastNo) from(select substr(taskno,length(taskno)-2)as lastNo from JG_LHJG_RWS)",
               nativeQuery = true)
       String getMaxOne();
}
